"""
使用 proxies代理参数
"""
import requests

url = 'https://www.baidu.com/'
# 从浏览器复制User-Agent、Cookie
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
                  "Chrome/86.0.4240.183 Safari/537.36",
}
proxies = {"http": "http://12.34.56.79:9527",
           "https": "https://12.34.56.79:9527", }
response = requests.get(url, proxies=proxies, headers=headers)
print(response.content.decode())
print(response.request.url)
